{extend name="pc/user/layout"/}
{block name="main"}
   <div class="g-1400 g-container" id="pjax-container">
		<div class="bg-bai b rx3" id="vue-page">
    <div class="t-v t-t">
        <div class="c-sidebar c-sidebar-h pb5 br">
            <div class="c-sidebar-title t-v hui bb">福利中心</div>
            <ul class="c-nav click-nav">
				<li class="active"><a href="{:url('pc/index',['act'=>'other','s'=>'qd'])}" class="t-v" data-pjax="">
					<div><i class="icon icon-write"></i></div>
					<div>每日签到</div>
				</a></li>
				<li class=""><a href="{:url('pc/index',['act'=>'other','s'=>'jfdh'])}" class="t-v" data-pjax="">
					<div><i class="icon icon-duijie"></i></div>
					<div>积分兑换</div>
				</a></li>
				<li class=""><a href="{:url('pc/index',['act'=>'other','s'=>'jfcj'])}" class="t-v" data-pjax="">
					<div><i class="icon icon-present"></i></div>
					<div>积分抽奖</div>
				</a></li>
			</ul>
        </div>
        <div class="c-content bl">
            <div class="col-6 fl br" style="min-height:420px;">
                <div class="g-title t-v pl4 bb">
                    <div class="col-12 h t-v bold">每日签到</div>
                </div>
                <div class="g-content o-h p5 f3 hui bb"><p>1、每天第一名签到获得{$qd.give_shop}奖励！</p>
                    <p>2、每天前{$qd.user_jf.0}位签到的用户可以获得{$qd.user_jf.1}积分奖励!</p>
                    <p>3、连续签到将会获得站长设置的额外积分，赶快参与吧！</p>
                    <p>4、获得积分可用于平台抽奖、兑换VIP、挂机配额、代理权限等</p></div>
                <div class="g-content h12 t-v bb">
                    <div class="col-6 h9 t-v t-c br">连续签到：<font class="f5 hong mr2 qdhtmlday">{if condition="$qd.day.day neq ''"}{$qd.day.day}{else /}0{/if}</font>天</div>
                    <div class="col-6 h9 t-v t-c">拥有积分：<font class="f5 hong mr2 userscore" id="jf">{$userInfo.jf}</font>个</div>
                </div>
                <div class="g-content t-c p5 pt10 qdhtmlbtn" id="button">
                                        <button class="btn btn-qing btn-md w22 rx1" onclick="x.mode('{:url('pc_html/other',['act'=>'qd'])}');">点 此 签 到</button>
                                    </div>
            </div>
            <div class="col-6 fl bl" style="margin-left:-1px;">
                <div class="g-title t-v pl4 bb">
                    <div class="col-12 h t-v bold">签到记录 <font class="ml5 f3 hui nobold">共有&nbsp;<span class="index_selcount">{{total}}</span>&nbsp;条</font></div>
                </div>
                <div class="g-content in-list in-p in-b" id="qdlist">
				<dl v-for="row in list">
					<dt><img class="w9 h9 b r5 mr2" v-bind:src='row.photo'></dt>
					<dd><p class="f3 hong"><i class="icon icon-my"></i> {{row.nickname}}</p>
						<p class="f3 hui">{{row.data}}</p></dd>
					<dt class="t-r"><p class="lv bold">签到{{row.day}}天</p>
						<p class="f3 hui">{{row.qdtime}}</p></dt>
				</dl></div>
            </div>
        </div>
    </div>
    <div class="c-pagination o-h t-v">
        <div class="c-sidebar"></div>
        <div class="c-content h11 o-h g-btn t-v bt bl">
            <div class="col-6 h t-v f3 hui pl5 pr5">注意：签到会在你所选择的QQ空间内发布一条本平台的推广广告说说，如不能接受，请勿签到！</div>
            <div class="col-6 h no g-btn g-minhide t-v t-c">
                <pagination ref="pagination" :total="total" :current_page="search.page" :page_size="search.pageSize"
                            @page-phange="pageChange"></pagination>
            </div>
        </div>
    </div>
</div>
   </div> 
{/block}
{block name='foot'}
<script>
new Vue({
            el: '#vue-page',
            data: {
                search: {
                    page: 1,
                    pageSize: 10,
                },
                total: 0,
                jf: '',
                list: []
            },
            methods: {
                pageChange: function (p) {
                    this.search.page = p;
                    this.loadList();
                },
                loadList: function () {
                    this.$refs.pagination.setCurrent(this.search.page);// 改变页码
                    var vue = this;
                    app.ajax("{:url('UserAjax/other',['act'=>'qdList'])}", this.search, function (data) {
                        if (data.code === 0) {
                            $("#jf").html(data.jf);
                            vue.total = data.total;
                            vue.list = data.list;
                        } else if (data.code === -1) {
                            $("#button").html(data.alert);
                            vue.total = data.total;
                            vue.list = data.list;
                        } else {
                            x.msg(data.message);
                        }
                    },'',false)
                }
            },
            mounted: function () {
                this.loadList();
            }
        });
</script>
{/block}